<extend name="Base/common"/>
<block name="style">

<style type="text/css">
	.head{
		width:100%;
		height:18%;
		background:#1c1c20;
	}
	.bd_center{
		width: 100%;
		height:auto;
		margin:auto;
		margin-top:25px;
	}
	
	.toux{
		width: 75px;
		height: 75px;
		border:3px solid #959595;
		border-radius: 5px 5px;
		float: left;
		margin-left: 3%;
		margin-top: 3%;
	}
	.toux img{
		width: 69px;
		height: 69px;
	}
	.details{
		float:left;
		width: 70%;
		height: 40px;
		font-size: 14px;
		color: #e5c37c;
		margin-left: 4%;
		margin-top: 3%;
	}
	.details img{
		width:18px;
		height:18px;
	}

	.gg{
		height: 30px;
		width:100%;
		background: #fcefcc;
		color: #e99336;
		font-size: 11px;
		line-height: 30px;
		text-indent: 1em;

	}

	._tixian{
		width: 100%;
		height: 7%;
	}

	i{
		float:right;
		width:40px;
		height:40px;
		margin-top: 3px;
		/*margin-top:-6%;*/
		background: url(__IMG__/koubei/btn_on.png);
		background-repeat:no-repeat;
		 background-size:100% 100%;
		 -moz-background-size:100% 100%;
	}

	.title{
		width: 100%;
		height: 50px;
		line-height:50px;
		padding-left: 5%;
		font-size: 16px;
		color: #4D4D4D;
		background: #efefef;
		border: 1px solid #e6e6e6;
	}
	.ico{
		width: 22px;
		height: 22px;
		margin-top:14px;
	}
	.bd_center .ico{
		max-width:22px;
		_width:expression(this.width > 22 ? "22px" : this.width);
		max-height:22px;
		_height:expression(this.height > 22 ? "22px" : this.height);
		}
	ul li{
		/*float: left;*/
		padding-left: 5%;
		height: 50px;
		font-size: 12px;
		line-height: 50px;
		border-bottom:1px solid #f8f8f8;
		border-top:1px solid #f8f8f8;
		/*margin-top: 1%;*/

	}
/*	ul li a{
		display: block;
		width: 20px;
		height: 20px;
		border: 2px solid #EAEAEA;
		border-radius: 50% 50%;
		color: #000;

	}*/
	ul li span{
		
		font-size: 14px;
		margin-left: 3%;
		color: #656363;
		
	}

	ul li b{
		float: right;
		width: 20px;
		height:25px;
		margin-top: 12.5px;
		background: url(__IMG__/koubei/right.png);
		background-repeat:no-repeat;
		 background-size:100% 100%;
		 -moz-background-size:100% 100%;
		
	}

	.gg{
		height: 35px;
		width:100%;
		background: #fcefcc;
		color: #e99336;
		font-size: 12px;
		line-height: 35px;
	}

	.tips{
		position:fixed;
		top:0px;
		background: rgba(0,133,208,0.5);
		width:100%;
		color:#fff;
		font-size:16px;
		text-align: left;
		text-indent: 2em;
		line-height:30px;
		z-index: 999;
	}
</style>

</block>

<block name="body">
	
	<p class="tips"></p>
<div class="tab-list">			

								<!-- 账单 -->
								<div style="display:none">
									<link href="__CSS__/lyz.calendar.css" rel="stylesheet" type="text/css" />
									<style type="text/css">

										a{
											padding-left:2px;
											padding-right:2px;
										}

									    select{
									        width: 15%;
									        height: 21px;
									        background:#0085d0;
									        float: left;
									        border:1px solid #0085d0;
									        border-radius: 5px 5px;
									        margin-top:5px;
									        margin-left:5px;
									        font-size: 12px;	        
									        color: #fff;
									        direction: ltr;
									        padding-left: 3%;
									    }
									    select option{
									        width:100%;
									    }



									    .search_btn{
									        width: 15%;
									        height: 21px;
									        background:#0085d0;
									        float: left;
									        border:1px solid #0085d0;
									        border-radius: 5px 5px;
									        margin-top:5px;
									        margin-left:5px;
									        font-size: 12px;
									        text-align: center;
									        color: #fff;
									    }

									    .text{
									    	float: left;
									    	width:30%;
									    	height:20px;
									    	color:orange;
									    	font-size: 10px;
									    	line-height: 20px;
									    	text-align: left;
									        margin-left:5px;

									        margin-top:0px; 
											margin-left: 0;
									    }


										.button{
											width: 80%;
											height: 80%;
											border-radius: 9px 9px;
											background: #87CEFF;
											border: 0.5px solid  #87CEFA;

										}

									</style>

										<php>
											$uid=$ptyh['uid'];
											
									        
									        $total1  =D('Dingdan')->where(['uid'=>$uid,'status'=>1])->sum('yh_money');     //订单获得
									        $total2  =D('Dividend')->where(['uid'=>$uid,'status'=>1])->sum('divide'); //推广获得
									        $total3  =D('Split')->where(['uid'=>$uid,'status'=>1])->sum('sh_money'); //口碑收益获得
									        $total4  =D('Youka')->where(['uid'=>$uid,'status'=>1])->sum('yh_money'); //油卡核销获得
									        $total   =$total1+$total2+$total3+$total4;

									        $money   =D('Extract')->where(['uid'=>$uid,'status'=>1])->sum('money');
									        
										</php>
									<div style="width:100%;height:100%;">
								    
									        <div style="width:100%;height:100px;position:fixed;top:0;background: #fff;z-index:1">
									            <form action="" method="get" id="dingdanform" style="margin-top: 2%;background: #fff;">
									                    <span class="text" style="width:14%;color:#111;margin-left:5px;">选择日期</span>
									                    <php>
									                    	$time1=date("Y-m-d");
									                    	$time2=date("Y-m-d",time()+86400);
									                    </php>
									                    <input id="txtBeginDate" name="start_time"  style="width:30%;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;margin-left:5px;float:left;text-align:center;font-size:12px;height:21px;color:#0085d0" placeholder="{$time1}" value=""/>


									                    <p style="float:left;margin-left:1px;margin-right:1px;line-height:21px;font-size:12px;">至</p>


									                    <input id="txtEndDate" name="died_time" placeholder="{$time2}"  style="width:30%;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;text-align:center;font-size:12px;height:21px;color:#0085d0"/>

									                    <select name="type" style="margin-top:0px;" id="type">
									                        <option value="-1">全部</option>
									                        <option value="1">订单</option>
									                        <option value="2">分润</option>
									                        <option value="3">提现</option>
									                        <option value="4">口碑</option>
									                    </select>
									                
									                    <span class="text" style="width:14%;color:#111;margin-left:5px;margin-top:5px;">支付单号</span>
									                    <input name="danhao" class="search_danhao" style="width:48%;height:21px;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;margin-left:5px;margin-top:5px;font-size:12px;color:#ddd" holdplace="平台单号或支付宝单号" id="danhao"/>
									                    
									           
									                
									                    <select name="status" id="status">
									                        <option value="-1">全部</option>
									                        <option value="1">成功</option>
									                        <option value="0">失败</option>
									                    </select>
									                    <button type="button" class="search_btn">搜索</button>
									            </form>
									            <div style="height:5px;width:100%;border-bottom:1px solid #c9caca;clear:both"></div>
									            <div style="width:100%;height:40px;background:#f8f9fe">
									        	    <span class="text" style="width:100%;color:#111;margin-left:5px;">您的账单</span>
									        	
									            	<span class="text" style="color:#111;margin-left:5px;">总收入：+{$total}</span>
									           
									               	<span class="text" style="color:#111;margin-left:5px;">总支出：-{$money}</span>
									       

													<span class="text" style="width:35%;color:orange;margin-left:5px;">失败订单不显示余额</span>
									            	<div style="height:1px;width:100%;border-bottom:1px solid #c9caca;clear:both"></div>
									            	

										    	</div>

									        </div>

									        <div style="height:100px;"></div>




											
											<div class="dingdan_list">
												<notempty name="dingdan_list">
												        <foreach name="dingdan_list" item="vo" >
												        	<php>
												        		$id=$vo['danhao'];
												        		$type=$vo['type'];
												        		$url="http://qnm.upslope.cn/index.php?m=Weixin&c=Koubei&a=dingdan_view&id=$id&type=$type";
												        	</php>
												            <a href="{$url}" style="background:url(__IMG__/you.png) no-repeat fixed right;">
												                
												                <div class="weui-form-preview__bd" style="position:relative;padding:0px 10px;margin-top:-20px;">
												                    <div style="width:30px;height:30px;float:left;margin-top:3%;margin-right:5px;">
												                        <php>
												                            if($vo['type']==1){
												                                $img='ding.png';
												                            }else if($vo['type']==2||$vo['type']==4){
												                                $img='fen.png';
												                            }else if($vo['type']==3){
												                                $img='ti.png';
												                            }else{
																				$img='ding.png';
													                        }
												                        </php>
												                        <img src="__IMG__/koubei/{$img}" >
												                    </div>
												                    <div class="weui-form-preview__item" style="width:89%;">
												                        <label class="weui-form-preview__label" style="height:25px;font-size:16px;color:#434242;text-align-last: left;">
												                        	<php>if($vo['type']==1){
																				echo "订单";
																			}elseif($vo['type']==2||$vo['type']==4){
																				echo "分润";
																			}elseif($vo['type']==3){
																				echo "提现";
																			}else{
																				echo '油卡';
																			}
																		</php>
												                        </label>
												                        <em class="weui-form-preview__value" style="height:25px;font-size:14px;color:#434242;margin-right:12px;">

												                            <php>
												                            	if($vo['type'==5]){
													                            	if($vo['status']==1){
														                                echo "<font style='color:green'>成功</font>";
														                            }elseif($vo['status']==2){
														                                echo "<font style='color:red'>失败</font>";
														                            }else{
															                            echo "<font style='color:bulue'>处理中</font>";
															                        }
													                            }else{
														                            if($vo['status']==1){
														                                echo "<font style='color:green'>成功</font>";
														                            }elseif($vo['status']==0){
														                                echo "<font style='color:red'>失败</font>";
														                            }
														                        }
												                            	

												                        	</php>
												                        	
												                        	<php>if($vo['type']==1){
																				echo '+';
																			}elseif($vo['type']==2||$vo['type']==4){
																				echo "+";
																			}elseif($vo['type']==3){
																				echo "-";
																			}</php>
																			{$vo.money}

												                        </em>
												                    </div>

												                    <div class="weui-form-preview__item" style="width:89%;">
												                        <label class="weui-form-preview__label" style="height:25px;text-align-last: left;">
												                        	<php>if($vo['time']==''){
																			}else{
																				echo date("Y-m-d H:i:s",$vo['time']);
																			}</php>
												                        </label>
												                        <em class="weui-form-preview__value" style="height:25px;font-size:14px;color:#434242;margin-right:12px;">
												                        	余额 {$vo.t_money}
												                        </em>
												                        
												                        
												                    </div>
												                    <img src="__IMG__/you.png" style="height:100%;width:8px;position:absolute;ringht:0;top:-2px;">


												                </div>
												                <div style="height:1px;width:100%;border-bottom:1px solid #c9caca;"></div>

												            </a>
												        </foreach>
												       <else/>
												        <div class="page__bd">
												            <div class="weui-loadmore weui-loadmore_line">
												                <span class="weui-loadmore__tips">暂无订单</span>
												            </div>
												        </div>
												        </notempty>

											</div>
										
									</div>
								</div>

								<!-- 提现 -->
								<div style="display:none">
									<style type="text/css">
										    .p{
										        width: 100%;
										        height: 55px;
										        padding:0 5%;
										        margin-top:10px; 
										        background: #fff;

										    }
										    .p span{
										        height: 20px;
										        line-height: 20px;
										        text-align: center;
										        float: left;
										    }
										    .p input{
										        /*width: 65%;*/
										        height: 20px;
										        line-height: 20px;
										        /*background: #fff;*/
										        float: left;
										        border:0px;
										    }

										    
										    .span{
										        float: left;
										        width: 90%;
										        font-size: 13px;

										    }
										    #tixianform{
										    	width: 100%;
										    	height:100%;
										    	padding-top:10px;
										    	background: #f5f4f9;

										    }

										    #tixianform img{
												display: block;
												float: left;
												width: 35px;
												height: 35px;
												margin-top:10px;
											}
									</style>

									<php>
										$uid=$ptyh['uid'];
								        $list=D('Ptyh')->where("uid=".$uid)->find();
								        $gather=D('Gather')->where("uid=".$uid)->find();
								        
									</php>

									<form action="" method="post" id="tixianform">
								        <div class="p">
											<img src="__IMG__/zfb.png">
											<div style="float:left;margin-left:5px;height:55px;">
												<p style="height:30px;font-size:16px;line-height:30px;color:#000">支付宝</p>
								            	<p style="height:20px;font-size:13px;line-height:20px;color:#888">{$list.alipay}</p>
											</div>
											<div style="clear:both"></div>
								            

								            <input name='uid' type="hidden"  class="tixian_uid" value="{$uid}">
								      	</div >
								        
								        <div class="" style="height:120px;background:#fff;margin-top:20px;padding:0 5%;">
											<span>提现金额</span>
						                    <i style="width:100%;float:left;background:none">
						                        <b style="float:left;width:5%;height:100%;font-family:Arial;font-size:24px;padding-bottom:0;height:50px;line-height:60px;">&yen;</b>
						                        <input class="money" type="text" name="money"   id="money" value="{$gather.money}" style="height:50px;line-height:70px;border:0px;border-bottom:1px solid #ccc;width:95%;font-size:24px;"/>
						                        
						                    </i>
						                    <div style="clear:both"></div>
						                    <input type="hidden" id="uid" name="alipay" value="{$list.alipay}"/>
						                    <span style="display:inline-block;margin-top:15px;font-size:13px;">当前可提现余额{$gather.money}元</span>

						                    <!-- <input type="text"  maxlength="30" name="subject"  placeholder="添加备注(限30字内)" style="height:20px;font-size:12px;border:none"/> -->
						                    
						                </div>
								        <button type="button"  class=" login-btn" style="width:90%;margin-left:5%;">提现</button>
								         
								    </form>

								  <!--   <span class="span">
								        温馨提示：商户单笔提现最高5万元。
								    </span>

								    <if condition="$gather[frozen] eq 0">
								        <span class="span">您的账户余额已被冻结，原因是：{$gather.frozen_cause} <a href="{:U('shensu')}&id={$list.shop_name}">我已处理完成>>></a></span>
								    </if> -->

								</div>


								<!-- 个人中心 -->


								<div style="display:none">
										<div class="head">
											<div class="toux"><img src="{$one.headimgurl}"></div>
											<?php
												if($ptyh['wx_uid']==0){
											?>
											<a href="{:U('band_wx')}" style="width:70%;float:left;margin-left:4%;color:#fff;font-size:11px;margin-top:3%;text-align:right;font-family:'YouYuan'">
												微信绑定>>
											</a>
											<?php
												}else{
											?>
											<a href="{:U('unband_wx')}" style="width:70%;float:left;margin-left:4%;color:#fff;font-size:11px;margin-top:3%;text-align:right;font-family:'YouYuan'">
												微信解绑>>
											</a>
											<?php
												}
											?>
											<div class="details">
												<p style="width:80%;float:left">
													<?php
														if(empty($ptyh)){
													?>
													{$one.nickname}
													<?php
														}else{
													?>
													
													商户名：{$ptyh.shop_name}<br><font style="font-size:10px;">商户号：{$ptyh.yh_uid}</font>
													
													<?php
														}
													?>
												</p>
												<a href="{:U('pdata')}">
												<p style="width:20%;float:right;margin-top:4%">
													<img src="__IMG__/koubei/edit.png" style="float:right;">

												</p>
												</a>
											</div>
										</div>


									<div class="_tixian"> 
										<p style="width:45%;height:50px;float:left;color:#afafaf;font-size:12px;margin-left:5%;margin-top:5px;">
											余额(元)<br> <font style="font-size:21px;color:#3e3a39">{$gather.money}</font>
											
										</p>

										<p  style="width:45%;height:50px;float:right;margin-right:5%;line-height:50px;font-size:13px;">
													<font style="margin-left:25%"> 在线收款</font>
													<?php 
														if($gather['status']==0){
													?>
														<font style="font-size:13px;">[关]</font><i id="shouk" style="background: url(__IMG__/koubei/btn_off.png);background-repeat:no-repeat;background-size:100% 100%;-moz-background-size:100% 100%;"></i>
													<?php 
														}else{
													?>
													<font style="font-size:13px;color:green">[开]</font><i id="shouk"></i>
													<?php 
														}
													?>			
										</p>
										<!-- <div style="clear:both"></div> -->
									
										

									 </div>


									<div class="bd_center"  >
										
										<p class="title" style="height:20px;">
											
										</p>
										<ul>
											<li> 
												<a href="{:U('pdata1')}" style="display:block;width:100%">
													<label id="yonghu">
													<img class="ico" src="__IMG__/koubei/icon1.png" >
												
												 <span>个人设置</span><b></b>
												</label>
												 </a> 
											
											</li>


											<li> 
												<a href="{:U('erwm')}" style="display:block;width:100%">
												    <label id="erwm">
													
														<img class="ico" src="__IMG__/koubei/icon5.png">
													
														<span>我的二维码</span>
														<b></b>
													  
												    </label>
												</a>
											</li>
											<li> 
												<a href="{:U('bar')}" style="display:block;width:100%">
												    <label id="bar">
													
														<img class="ico" src="__IMG__/koubei/icon13.png">
													
														<span>条码收款</span>
														<b></b>
													  
												    </label>
												</a>
											</li>
						<?php
							$uid=$ptyh['uid'];
							$allow=D('Kballow')->where(['uid'=>$uid])->find();
							$kbxx=D('Kbxx')->where(['uid'=>$uid])->find();
							if(!empty($allow)||!empty($kbxx)){
						?>

									<li style=""> 
										<a href="{:U('shanghu_band')}" style="display:block;width:100%">
											<label id="shanghu_band">
										<img class="ico" src="__IMG__/koubei/icon1.png" >
										
										 <span>码主绑定</span><b></b>
										</label>
										 </a> 
									
									</li>

									<li style=""> 
										<a href="{:U('kbsh')}" style="display:block;width:100%">
											<label id="kbsh">
										<img class="ico" src="__IMG__/koubei/icon4.png" >
										
										 <span>码商系统</span><b></b>
										</label>
										 </a> 
									
									</li>
						<?php
							}
						?>

											<li style=""> 

												<a href="{:U('rate')}" style="display:block;width:100%">
													<label id="rate">
													
													<img class="ico" src="__IMG__/koubei/icon11.png">
													
													 <span>我的费率</span>
													<b></b>
													</label>
												</a> 
											</li>
											

											<li> 
												<a href="{:U('question')}" style="display:block;width:100%">
													<label id="question">						
															<img class="ico" src="__IMG__/koubei/icon10.png">						
														<span>商户常见问题</span>
														<b></b>
													</label>
												</a> 
											</li>
											<if condition="$ptyh[uid] eq 2">

													<li> 
														<a href="{:U('trans_fault')}" style="display:block;width:100%">
														    <label id="trans">
															
																<img class="ico" src="__IMG__/koubei/icon3.png">
															
																<span>回款失败订单</span>
																<b></b>
															  
														    </label>
														</a>
													</li>
													

													<li> 
														<a href="{:U('close')}" style="display:block;width:100%">
															<label id="close">						
																	<img class="ico" src="__IMG__/koubei/icon10.png">						
																<span>通道管理</span>
																<b></b>
															</label>
														</a> 
													</li>


									<elseif condition="$ptyh[uid] eq 3"/>

													<li> 
														<a href="{:U('trans_fault')}" style="display:block;width:100%">
														    <label id="trans">
															
																<img class="ico" src="__IMG__/koubei/icon3.png">
															
																<span>回款失败订单</span>
																<b></b>
															  
														    </label>
														</a>
													</li>
													<li> 
														<a href="{:U('close')}" style="display:block;width:100%">
														    <label id="close">
															
																<img class="ico" src="__IMG__/koubei/icon3.png">
															
																<span>通道管理</span>
																<b></b>
															  
														    </label>
														</a>
													</li>

										<else/>
									</if>


											

										</ul>
									</div>

									


									
									<div style="height:50px;"></div>
								</div>





								<!-- 团队 -->

								<div style="display:none">
									<style type="text/css">
										.td_top{
											width:100%;
											height:69px;
											/*background: #fff;*/
										}

										.td_top p{
											width:100%;
											height:19px;
											line-height: 19px;
											color: #999;
											font-size: 13px;
											text-align: center;
										}
										.td_top .tg{
											width:60%;
											height:45px;
											margin:auto;
											text-align: center;
											background: #f2f1f6;
											border-radius: 22.5px 22.5px ;
											padding-top:7.5px;
											margin-top:3px;

										}
										.tg img{
											float: left;
											width: 30px;
											height:30px;



										}
										.tg p{
											float: left;
											width:113px;
											line-height: 15px;
											color: #0085d0;
											font-size: 17px;
											margin-left: 8px;
											text-align: left;

											
										}
										.tuanyuan,.up_set{
									        width: 15%;
									        height: 21px;
									        background:#0085d0;
									        float: left;
									        border:1px solid #0085d0;
									        border-radius: 5px 5px;
									        margin-top:5px;
									        margin-left:5px;
									        font-size: 12px;
									        text-align: center;
									        color: #fff;
									    }


									</style>
									<div style="width:100%;height:100%;">
								    
									        <div style="width:100%;height:150px;position:fixed;top:0;background: #fff;z-index:2">
									        	<div class="td_top"> 
									        		<if condition="$pid eq 0">
									        			<p></p>
									        			<else/>
									        			<p>我的推荐人：<font style="color:#0085d0">{$pid.name}-{$pid.phone}</font></p>
									        		</if>
									        		
									        		<div class="tg"> 
									        			<div style="width:72%;height:30px;margin-left:15%">
									        				<img src="__IMG__/koubei/tg_h.png">
									        				<p>我要推广</p>
									        				<p style="color:orange;font-size:12px;">推广码：{$_this.tg_num}</p>
									        			</div>
									        			
									        		</div>
									        	</div>
									            <form action="" method="get" id="teamform" style="background: #fff;">
									                    <span class="text" style="width:22%;color:#111;margin-left:5px;margin-top:5px;">费率统一修改</span>
									                    <input name="up_set"  style="width:47%;height:21px;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;margin-left:5px;margin-top:5px;font-size:12px;color:#ddd;text-align:center;" id="up_set"/>
									                    <font style="color:#000;float:left;font-size:15px;line-height:25px;width:3%">%</font>


									                   <!--  <input name="up_set"  style="width:23.5%;height:21px;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;margin-left:5px;margin-top:5px;font-size:12px;color:#ddd;text-align:center;" id="up_set" placeholder="花呗+分期"/>
									                    <font style="color:#000;float:left;font-size:15px;line-height:25px;width:3.5%;padding-left:5px;">/</font>
									                    <input name="up_set2"  style="width:23.5%;height:21px;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;margin-top:5px;font-size:12px;color:#ddd;text-align:center;" id="up_set2" placeholder="信用卡"/> -->
									                    
									                    <button type="button" class="up_set">确认</button>

									                    <span class="text" style="width:18%;color:#111;margin-left:5px;margin-top:5px;">查找团员</span>
									                    <input name="name" style="width:55%;height:21px;border-style: solid;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;float:left;margin-left:5px;margin-top:5px;font-size:12px;color:#ddd;text-align:center;" placeholder="编号"  id="tuanyuan"/>
									                    
									                    <button type="button" class="tuanyuan">搜索</button>
									            </form>
									            <div style="height:5px;width:100%;border-bottom:0.5px solid #c9caca;clear:both"></div>
									            <div style="width:100%;height:40px;background:#f8f9fe;margin-top:-5px;">
									            	<php>
									            		$count=count(D('Ptyh')->where(['pid'=>$_this['uid']])->select());
									            		
									            	</php>
									        	    <span class="text" style="width:100%;color:#111;margin-left:5px;">共{$count}条记录</span>
													<span class="text" style="width:100%;color:orange;margin-left:5px;">提示：您可修改下级费率，您与下级的费率差为您的分润值。</span>	            
										    	</div>

									        </div>

									        <div style="height:155px;background: #fff;"></div>




											
											<div class="team_list">
												<notempty name="team_list">
												        <foreach name="team_list" item="vo" >
												        	
												            <a  class="change_one"  style="">
												            	<input class="team_uid" type="hidden" value="{$vo.uid}">
												                
												                <div class="weui-form-preview__bd" style="position:relative;padding:0px 10px;margin-top:-20px;">
												                	<php>
																		$ga=D('Gather')->where("uid=".$vo['uid'])->find();
																	</php>
												                    <div class="weui-form-preview__item" >
												                        <label class="weui-form-preview__label" style="height:25px;text-align-last: left;">
												                        	<!-- {$vo.name} -->
												                        	<font style="float:left;font-size:16px;color:#434242;line-height:25px;">{$vo.name}</font>

												                        	<if condition="$ga[frozen] eq 0">
												                        		<font style="float:left;padding:0 8px 0 8px;height:15px;margin-top:5px;margin-left:3px;font-size:8px;background:#fe0000;border-radius:7.5px 7.5px;line-height:15px;color:#fff">异常</font>
												                        	<else/>
												                        		<font style="float:left;padding:0 8px 0 8px;height:15px;margin-top:5px;margin-left:3px;font-size:8px;background:#0085d0;border-radius:7.5px 7.5px;line-height:15px;color:#fff">正常</font>
												                        	</if>
												                        	
												                        </label>
												                        <em class="weui-form-preview__value" style="height:25px;font-size:16px;color:orange;">
																			{$ga.up_set}%

												                        </em>
												                    </div>

												                    <div class="weui-form-preview__item" >
												                        <label class="weui-form-preview__label" style="height:25px;text-align-last: left;">
												                        	编号：{$vo.yh_uid}
												                        </label>
												                        <em class="weui-form-preview__value" style="height:25px;font-size:12px;color:#434242;text-align-last: right;">
												                        	分润
												                        	<php>
																				$uid=$vo['uid'];
																				$_thisyh=D('Ptyh')->where("uid=$uid")->find();
																				$shou=$_thisyh['name'].'-'.$_thisyh['shop_name'];
																				$divide=D('Dividend')->where("shou='$shou'")->sum('divide');
																				if(empty($divide)){
																					echo "0.00";
																				}else{
																					echo $divide;
																				}
																				
																			</php>
												                        	
												                        </em>
												                        
												                        
												                    </div>
												                   


												                </div>
												                <div style="height:1px;width:100%;border-bottom:1px solid #c9caca;"></div>

												            </a>
												        </foreach>
												       <else/>
												        <div class="page__bd">
												            <div class="weui-loadmore weui-loadmore_line">
												                <span class="weui-loadmore__tips">暂无团员</span>
												            </div>
												        </div>
												        </notempty>

												        <div style="height:50px;"></div>

											</div>
										
									</div>
									<style type="text/css">
										.td_block{
											width:100%;
											height:100%;
											position:fixed;
											z-index: 3;
											top:0;
											background: rgba(0,0,0,0.4);
											text-align: center;
											color: red;
											display: none;
											border-radius: 5px 5px;
										}
										.td_block .tg_ewm{
											width:200px;
											height:225px;
											margin:0 auto;
											margin-top: 20%;
											background: #fff;
											border-radius: 5px 5px;
										}
									</style>
									<div class="td_block">
										<div class="tg_ewm">
											<php>
												$tg_uid=$_this['uid'];
												$url = "http://qnm.upslope.cn/index.php?m=weixin&c=koubei&a=tgm_band&uid=".$tg_uid;
        										$url= urlencode($url);
											</php>
											<img  src="{:U('Admin/Public/qrcode?type=8&url='.$url)}" style="border-radius: 5px 5px;margin-top:0">
											<div>{$_this.tg_num}</div>
										</div>
									</div>


									<style type="text/css">
										.td_change{
											width:100%;
											height:100%;
											position:fixed;
											z-index: 3;
											top:0;
											background: rgba(0,0,0,0.4);
											text-align: center;
											color: red;
											display: none;
											border-radius: 5px 5px;
										}
										.td_change .tg_ewm{
											width:200px;
											height:auto;
											margin:0 auto;
											margin-top: 20%;
											padding:10px 0;
											background: #fff;
											border-radius: 5px 5px;
										}
									</style>

									<div class="td_change">
										<div class="tg_ewm">
											<input class="team_uid" type="hidden" value="">
											<?php
												$c=D('Tongdao')->find();
												if($c['hk_hb']==1||$c['nhk_hb']==1||$c['hk_fq']==1||$c['nhk_fq']==1){


											?>
						                        <p style="float:none;">
													<font style="float:left;font-size:13px;color:#000;line-height:45px;margin-left:5px;">花呗+分期：</font><input class="up_set1" tyle="text" style="border:0;border-bottom:1px solid #ccc;background:none;height:30px;width:100px;">
													<div style="clear:both"></div>
												</p>
											<?php
						                		}else if($c['hk_xyk']==1||$c['nhk_xyk']==1){
						                    ?>
						                    
						                        <p style="float:none;">
													<font style="float:left;font-size:13px;color:#000;line-height:45px;margin-left:5px;">信用卡：</font><input class="up_set2" tyle="text" style="border:0;border-bottom:1px solid #ccc;background:none;height:30px;width:125px;">
													<div style="clear:both"></div>
												</p>
											<?php
						                		}
						                    ?>

						                     
												
												

												<p style="float:none;">
													<button type="button" class="login-btn change-btn" style="margin-top:0px;width:80%;height:25px;margin-top:5px;line-height:25px">修改</button>
												</p>
	
										</div>
									</div>

									
								</div>


								<!-- 生活服务 -->

								<div style="display:none">
									<style type="text/css">
										.shfw{
											width: 100%;
											height:auto;
											margin:auto;
											margin-top:25px;
										}
										.shfw ul{
									        float: left;
									        width:100%;
									    }
										.shfw li{
									        float: left;
									        width:17%;
									        height:50px;
									        border:none;
									        padding:0;
									    }
									    .shfw li .ico{
									        width: 30px;
									        height: 30px;
									        display:block;
									        margin:auto;
									        margin-top:7px;
									    }
									    .shfw li span{
									        float: left;
									        font-size: 12px;
									        width:100%;
									        height:40px;
									        margin-top:-9px;
									        color: #ccc;
									        text-align: center;

									    }
									</style>
									<div class=" shfw"  style="margin-top:0px;">
										
										<p class="title" style="height:30px;font-size:14px;line-height:30px;">
											油卡回收
										</p>
										<ul>
											<li> 
												<a href="{:U('Service/youka')}" style="display:block;width:100%">
													<label >
														<img class="ico" src="__IMG__/koubei/icon-yk.png" >
													
													 	<span>油卡回收</span>
													</label>
												 </a> 
											
											</li>
											
										</ul>
										<div style="clear:both"></div>
									</div>

								</div>





</div>


<style type="text/css">
    .bottom{
        position: fixed;
        bottom:0;
        width:100%;
        height:50px;
        border-top: 0.5px #ccc solid;
        background: #fff;
        display: block;
        z-index: 99;
    }
    .bottom ul{
        width:100%;

    }
    .bottom li{
        float: left;
        width:20%;
        height:50px;
        border:none;
        padding:0;
    }
    .bottom li .ico{
        width: 19px;
        height: 19px;
        display:block;
        margin:auto;
        margin-top:7px;
    }
    .bottom li a{
        float: left;
        width:100%;
        height:100%;

    }
    .bottom li span{
        float: left;
        font-size: 12px;
        width:100%;
        height:40px;
        margin-top:-9px;
        color: #ccc;
        text-align: center;

    }
    .pcenter{
        background:rgb(0,162,232);
        border-radius: 50% 50% 0 0;
    }

</style>



<div class="bottom">
    <ul>
        <li >
           <a href="#0">
            <img class="ico" src="__IMG__/koubei/bm_000.png">
            <span>账单</span>
            </a>
        </li>
        <li>
         <a href="#1">
            <img class="ico" src="__IMG__/koubei/bm_001.png">
            <span>提现</span>
            </a>
        </li>
        <li  style="" class="">
            <a href="#2">
            <img class="ico" src="__IMG__/koubei/bm_002.png">
            <span>个人中心</span>
            </a>
                
        </li>
        <li>
            <a href="#3">
            <img class="ico" src="__IMG__/koubei/bm_003.png">
            <span>团队</span>
            </a>
                
        </li>
        <li style="float:right;">
            <a href="#4">
            <img class="ico" src="__IMG__/koubei/bm_004.png">
            <span>生活服务</span>
           </a>
                
        </li>

    </ul>
    
</div>   

</block>



<block name="script">
	<script type="text/javascript" src="__JS__/jquery-1.6.2.min.js"></script> 
	<script type="text/javascript" src="__JS__/jquery.cookie.js"></script> 
	<script type="text/javascript">
	var hash = location.hash;
	
    if(hash){
        var this_index=hash.match(/\d+/)[0]
    }else{
    	this_index=2
    }

    // if(hash){
        tab(this_index);
    // }else{
    // 	tab(2);
    // }


    if(this_index){

    	$('.bottom img').eq(this_index).attr('src',"/Public/Weixin/images/koubei/bm_0"+this_index+".png")
        $('.bottom span').eq(this_index).css('color',"#0085d0")
    	
    }
 




    $('.bottom li').click(function(){
    	 

        var index=$(this).index()

        tab(index);
        
        
        for(var i=0;i<5;i++){
        	
        	// if(index==2&&i==2){
        	// 	$('.pcenter').css('background',"#f8b62d")
        	// 	$('.bottom span').eq(i).css('color',"#fff")
        		
        	// }else{

        		if(i==index){
	        		$('.bottom img').eq(i).attr('src',"/Public/Weixin/images/koubei/bm_0"+i+".png")
	        		$('.bottom span').eq(i).css('color',"#0085d0")
	        	}else{
	        		// if(i==2){
	        		// 	$('.pcenter').css('background',"#0085d0")
	        		// 	$('.bottom span').eq(i).css('color',"#fff")
	        		// }else{
	        			$('.bottom img').eq(i).attr('src',"/Public/Weixin/images/koubei/bm_00"+i+".png")
	        			$('.bottom span').eq(i).css('color',"#ccc")
	        		// }
	        		
	        	}
        	// }
        	
        }
        
        hash = $(this).find('a').attr('href');
    });
    function tab(index){
        $('.tab-list > div').siblings('.tab-list > div').hide().end().eq(index).show();
    }




		
			// $(".bottom li").click(function(){
		 //    	//通过 .index()方法获取元素下标，从0开始，赋值给某个变量
		 //    		var _index = $(this).index();
		 //    	//让内容框的第 _index 个显示出来，其他的被隐藏
		 //        $(".tab-list > div").eq(_index).show().siblings().hide();
		 //    	//改变选中时候的选项框的样式，移除其他几个选项的样式
		 //    	// $(this).addClass("change").siblings().removeClass("change");
		 //    });
		

		

	</script>

<!-- 个人中心 -->
<script type="text/javascript">

$('#shouk').click(function(){
	$.ajax({
		type:'get',
		url:"{:U('shou_inline')}",
		success:function(m){
			// popup.alert(m)
			location.href="{:U('index')}";
		}
	})
})
</script>
<!-- 账单 -->
<script src="http://www.jq22.com/jquery/1.4.4/jquery.min.js"></script>
<script src="__JS__/lyz.calendar.min.js" type="text/javascript"></script> 
<script>
var winHeight = $(window).height();  
$("body").css({height:winHeight});  
 var winHeight2=0;
 var winHeight3=0;
 var num=0;
$(window).resize(function(){  
	num++;
	if(num%2==1){
		winHeight2 = $(window).height(); 
	}else{
		winHeight3 = $(window).height();
	} 
    if(winHeight2<winHeight3){
    	$('.bottom').show()
    }else{
    	$('.bottom').hide()
    }

    if(num%2==1){
		
	}else{
		num=0;
		winHeight2 = 0; 
		winHeight3 = 0;
	}
});

        $('.search_btn').click(function(){
        	// $('#dingdanform').submit()
            var start_time=$('#txtBeginDate').val();
            var died_time =$('#txtEndDate').val();
            var status    =$('#status').val();
            var type      =$('#type').val();
            var danhao    =$('#danhao').val();
            location="http://qnm.upslope.cn/index.php?m=Weixin&c=Koubei&a=index2&start_time="+start_time+"&died_time="+died_time+"&status="+status+"&type="+type+"&danhao="+danhao+hash

        })

function timestampToTime(timestamp) {
    var date = new Date(timestamp * 1000);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
    Y = date.getFullYear() + '-';
    M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
    D = date.getDate() + ' ';
    h = date.getHours() + ':';
    m = date.getMinutes() + ':';
    s = date.getSeconds();
    return Y+M+D+h+m+s;
}

function count(o){
    var t = typeof o;
    if(t == 'string'){
            return o.length;
    }else if(t == 'object'){
            var n = 0;
            for(var i in o){
                    n++;
            }
            return n;
    }
    return false;
};



        // $("#txtBeginDate").click(function(){
        	// $("#txtBeginDate").calendar();
        // })
        // $("#txtEndDate").click(function(){
        	// $("#txtEndDate").calendar();
        // })

			$('.search_danhao').focus(function(){
				$('.bottom').hide()

			})
			$('.search_danhao').blur(function(){
				$('.bottom').show()

			})



</script>


<!-- 团队 -->
<script type="text/javascript">

var uid_one=0;
//点击隐藏
$(".tg_ewm").click(function(e){
    $(this).show();
    e.stopPropagation();//阻止冒泡
});
$('.td_block,.bottom,.td_change').click(function(){
    $(".td_block").hide();
    $(".td_change").hide();
 
})
	

	$('.change_one').click(function(){
		$('.td_change').show()
		uid_one=$(this).find('.team_uid').val()
		$('.td_change').find('.team_uid').val($(this).find('.team_id').val())
	})

	$('.td_change').find('.change-btn').click(function(){
		var uid=uid_one
		var up_set=$('.td_change').find('.up_set1').val()
		var up_set2=$('.td_change').find('.up_set2').val()
		// alert(id)
		$.ajax({
			type:'post',
			data:{'uid':uid,'up_set':up_set,'up_set2':up_set2},
			url:"{:U('Koubei/team2')}",
			success:function(m){
				// alert(m)
					if(m>0){
						// 成功
							$('.tips').html('修改成功')
							$('.tips').show()
	                        setTimeout(function(){
	                            $('.tips').hide()
	                            $(".td_change").hide();
	                            location.reload()
	                        },3000)
							
						
					}else if(m==0){
						$('.tips').html('修改失败')
						$('.tips').show()
	                    setTimeout(function(){
	                        $('.tips').hide()
	                        
	                    },3000)
					}else{
						$('.tips').html(m)
						$('.tips').show()
	                    setTimeout(function(){
	                        $('.tips').hide()
	                        
	                    },3000)
					}
			}
		})
	})


	$('.tg').click(function(){
		$('.td_block').show()
	})

	$('.tuanyuan').click(function(){
		var tuanyuan=$('#tuanyuan').val();
		location="http://qnm.upslope.cn/index.php?m=Weixin&c=Koubei&a=index2&tuanyuan="+tuanyuan+hash

	})

	$('#teamform').find('.up_set').click(function(){

		var up_set=$('#up_set').val();
		$.ajax({
			type:'post',
			data:{'uid':1,'up_set':up_set},
			url:"{:U('Koubei/team2')}",
			success:function(m){
				if(m>0){
					// 成功
						$('.tips').html('修改成功')
						$('.tips').show()
                        setTimeout(function(){
                            $('.tips').hide()
                            location.reload()
                        },3000)
						
					
				}else if(m==0){
					$('.tips').html('修改失败')
					$('.tips').show()
                    setTimeout(function(){
                        $('.tips').hide()
                        
                    },3000)
				}else{
					$('.tips').html(m)
					$('.tips').show()
                    setTimeout(function(){
                        $('.tips').hide()
                        
                    },3000)
				}
			}
		})
	})


</script>


<!-- 提现 -->
<script type="text/javascript">

		$('#tixianform .login-btn').click(function(){

		    var data=$('#tixianform').serializeArray();
		    $.ajax({
		        type:'post',
		        url:"{:U('User/tixian_btn')}",
		        data:data,
		        success:function(m){
		            if(m==1){
		                $('.tips').html('提现成功')
		                $('.tips').show()
		                setTimeout(function(){
		                    $('.tips').hide()
		                    location.href="{:U('Koubei/index')}"
		                    
		                },3000)
		            }else{
		                $('.tips').html(m)
		                $('.tips').show()
		                setTimeout(function(){
		                    $('.tips').hide()
		                },3000)
		            }
		        }
		    })
		})




</script>


</block>